package com.es.www.kyl.exception;

import com.es.www.kyl.constant.BusinessResultEnum;

public class ResException extends RuntimeException{

    private String code;

    public String getCode() {
        return code;
    }

    public ResException() {
    }

    public ResException(String code, String message) {
        super(message);
        this.code = code;
    }

    public ResException(BusinessResultEnum exceptionEnum){
        this(exceptionEnum.getCode(),exceptionEnum.getMessage());
    }

    public ResException(String message){
        super(message);
        this.code = "500";
    }
}
